package man4j;

import javax.microedition.lcdui.TextField;

public class Task extends TextField {
	private boolean complete;	
	
	public Task() {
		super("New Task", "", 20, TextField.ANY);
	}
	
	public Task(String title, boolean complete) {
		super("", title, 20, TextField.ANY);
		
		this.complete = complete;
	}
	
	public boolean isComplete() {
		return complete;
	}
	
	public void setComplete(boolean complete) {
		this.complete = complete;
	}
	
	public boolean isDirty() {
		return getLabel().equals("");
	}
	
	public void makeDirty() {
		setLabel("");
	}
}
